const redis = require('redis')
const config = require('../conf/db.js').redis

// 创建客户端
const redisClient = redis.createClient(config.port, config.host)

// 处理错误
redisClient.on('error', err => {
  console.error(err)
})

module.exports = redisClient
